hysop.operator.solenoidal_projection module

@file solenoidal_projection.py SolenoidalProjection solver frontend.

class hysop.operator.solenoidal_projection.SolenoidalProjection(input_field, output_field, variables, input_field_div=None, output_field_div=None, implementation=None, base_kwds=None, **kwds)[source]

Bases: SpectralComputationalGraphNodeFrontend

Interface for solenoidal projection (project a 3d field F such that div(F)=0) Available implementations are:

*PYTHON (numpy fft based solver)

Initialize a SolenoidalProjection operator frontend for 3D solenoidal projection.

Fin (3d input_field) Fout (3d output_field)

Solves

laplacian(Fout) = laplacian(Fin) - grad(div(Fin))

Parameters:
  • input_field (Field) – input continuous field (all components)

  • output_field (Field) – output continuous field (all components)

  • input_field_div (Field, optional) – Optionally compute input field divergence.

  • output_field_div (Field, optional) – Optionally compute output field divergence.

  • variables (dict) – dictionary of fields as keys and topologies as values.

  • implementation (Implementation, optional, defaults to None) – target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

  • base_kwds (dict, optional, defaults to None) – Base class keywords arguments. If None, an empty dict will be passed.

  • kwds – Keywords arguments that will be passed towards implementation poisson operator __init__.

Notes

A SolenoidalProjection operator implementation should inherit from hysop.operator.base.solenoidal_projection.SolenoidalProjectionBase.

classmethod default_implementation()[source]

Return the default Implementation, should be compatible with available_implementations.

classmethod implementations()[source]

Should return all implementations as a dictionnary. Keys are Implementation instances and values are either ComputationalGraphNode or ComputationalGraphNodeGenerator.